package com.cskaoyan.mapper;

import com.cskaoyan.bean.BaseParamBo;
import com.cskaoyan.bean.admin.statement.StatUserRowsBeanVo;
import com.cskaoyan.bean.admin.statement.pojo.UserStat;
import com.cskaoyan.bean.admin.user.UserAddressVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

import com.cskaoyan.bean.pojo.User;
import com.cskaoyan.bean.pojo.UserExample;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);


    List<StatUserRowsBeanVo> statUser();

    int select1();

    @Select("select password from cskaoyanmall_user where username = #{username}")
    String selectPasswordByUsername(@Param("username") String username);

    User selectByUsername(@Param("username")String username);

    User selectByMobile(@Param("mobile")String mobile);

    List<UserStat> selectByGroup();

    List<UserAddressVo> selectAddressInfo(@Param("userId") Integer userId, @Param("username") String username, @Param("paramBo") BaseParamBo paramBo);

    Integer updateById(@Param("id")Integer id, @Param("wrongNum")Integer wrongNum, @Param("wrongTime") Date wrongTime);
}

